//
//  DLAssetsView.m
//  delongzhitou
//
//  Created by Mr.Wang on 2018/11/26.
//  Copyright © 2018 delongzhitou. All rights reserved.
//

#import "DLAssetsView.h"
#import "DLTotalMoneyVC.h"

@implementation DLAssetsView

- (instancetype) initWithFrame:(CGRect)frame {
    
    if (self = [super initWithFrame:frame]) {
        
        [self layoutSubControls];
    }
    return self;
}

- (void) layoutSubControls{
    
    UILabel *titleLabel = [UILabel new];
    titleLabel.frame = CGRectMake(0, 0, self.width, kAutoWidth(30));
    titleLabel.textColor = [UIColor whiteColor];
    titleLabel.font = kSystemFont(12);
    titleLabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:titleLabel];
    self.titleLabel = titleLabel;
    
    UILabel *countLabel = [UILabel new];
    countLabel.frame = CGRectMake(0, titleLabel.bottom, self.width, kAutoWidth(50));
    countLabel.textColor = [UIColor whiteColor];
    countLabel.font = kSystemFont(40);
    countLabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:countLabel];
    self.countLabel = countLabel;
    
    UITapGestureRecognizer *tapGes = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(totalMoneyViewTap)];
    [self addGestureRecognizer:tapGes];
}
- (void) totalMoneyViewTap {
//    DLTotalMoneyVC *totalMoneyVC = [DLTotalMoneyVC new];
//    [kuserManager.lastVc.navigationController pushViewController:totalMoneyVC animated:YES];
}

- (void) setTitle:(NSString *)title {
    _title = title;
    self.titleLabel.text = title;
}
- (void) setCount:(NSString *)count {
    _count = count;
    self.countLabel.text = count;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
